{% extends "base.html" %}

{% block title %}{{ t('checkpoints.title') }}{% endblock %}
{% block page_id %}checkpoints{% endblock %}

{% block init_title %}{{ t('initialization.checkpoints.title') }}{% endblock %}
{% block init_message %}{{ t('initialization.checkpoints.message') }}{% endblock %}
{% block init_check_url %}/api/checkpoints/list?page=1&page_size=1{% endblock %}

{% block additional_components %}

<div id="checkpointContextMenu" class="context-menu" style="display: none;">
    <div class="context-menu-item" data-action="refresh-metadata"><i class="fas fa-sync"></i> {{ t('loras.contextMenu.refreshMetadata') }}</div>
    <div class="context-menu-item" data-action="relink-civitai"><i class="fas fa-link"></i> {{ t('loras.contextMenu.relinkCivitai') }}</div>
    <div class="context-menu-item" data-action="copyname"><i class="fas fa-copy"></i> {{ t('loras.contextMenu.copyFilename') }}</div>
    <div class="context-menu-item" data-action="preview"><i class="fas fa-folder-open"></i> {{ t('loras.contextMenu.openExamples') }}</div>
    <div class="context-menu-item" data-action="download-examples"><i class="fas fa-download"></i> {{ t('loras.contextMenu.downloadExamples') }}</div>
    <div class="context-menu-item" data-action="replace-preview"><i class="fas fa-image"></i> {{ t('loras.contextMenu.replacePreview') }}</div>
    <div class="context-menu-item" data-action="set-nsfw"><i class="fas fa-exclamation-triangle"></i> {{ t('loras.contextMenu.setContentRating') }}</div>
    <div class="context-menu-separator"></div>
    <div class="context-menu-item" data-action="move"><i class="fas fa-folder-open"></i> {{ t('loras.contextMenu.moveToFolder') }}</div>
    <div class="context-menu-item" data-action="exclude"><i class="fas fa-eye-slash"></i> {{ t('loras.contextMenu.excludeModel') }}</div>
    <div class="context-menu-item delete-item" data-action="delete"><i class="fas fa-trash"></i> {{ t('loras.contextMenu.deleteModel') }}</div>
</div>
{% endblock %}

{% block content %}
    {% include 'components/controls.html' %}
    {% include 'components/duplicates_banner.html' %}
    {% include 'components/folder_sidebar.html' %}
    
    <!-- Checkpoint cards container -->
    <div class="card-grid" id="modelGrid">
        <!-- Cards will be dynamically inserted here -->
    </div>
{% endblock %}

{% block overlay %}
<div class="bulk-mode-overlay"></div>
{% endblock %}

{% block main_script %}
<script type="module" src="/loras_static/js/checkpoints.js"></script>
{% endblock %}
